#ifndef TASK_H
#define TASK_H

#include<pthread.h>
#include"task_manager.h"
#include"log.h"
#include<stdio.h>
#include<stdlib.h>

#define TASK_NAME_MAX_LEN 128

//struct task_manager;

struct task
{
	struct task *next;
	unsigned char is_default;
	char task_name[TASK_NAME_MAX_LEN];
	pthread_t tid;
	
	void *(*func)(void*);	
};

/*
extern int register_task(struct task_manager *Task_manager, struct task *task);
extern int register_plugin_task(struct task_manager *Task_manager,char *task_name, void *(*func)(void *));
extern void start_task(struct task_manager *Task_manager);
extern struct task *get_task_by_name(struct task_manager * Task_manager,char *name);
extern struct task *get_task_by_tid(struct task_manager * Task_manager,pthread_t tid);
*/
#endif

